/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package teamBlitz;

import com.sun.squawk.util.Arrays;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.can.*;

/**
 *
 * @author danielle
 */
public class Shooter 
{
    
    CANJaguar shooter1;
    CANJaguar shooter2;
    CANJaguar shooter3;
    
  

    public Shooter() 
    {  
        try
        {
            shooter1 = new CANJaguar(10, CANJaguar.ControlMode.kSpeed);
            shooter2 = new CANJaguar(11, CANJaguar.ControlMode.kSpeed);
            shooter3 = new CANJaguar(12, CANJaguar.ControlMode.kSpeed);
            shooter1.setSpeedReference(CANJaguar.SpeedReference.kEncoder);
            shooter2.setSpeedReference(CANJaguar.SpeedReference.kEncoder);
            shooter3.setSpeedReference(CANJaguar.SpeedReference.kEncoder);
            shooter1.configEncoderCodesPerRev(360);
            shooter2.configEncoderCodesPerRev(360);
            shooter3.configEncoderCodesPerRev(360);
            shooter1.setPID(2, 0.01, 0);
            shooter2.setPID(2, 0.01, 0);
            shooter3.setPID(2, 0.01, 0);
        } catch (Exception e) 
        {
            System.out.println(e + " init");
        }
}
    
            
    boolean Ready (int force)
    {
        try
        {
            shooter1.setX(-20*60);
            shooter2.setX(20*60);
            shooter3.setX(-20*60);
            return(true);
        }catch (Exception e)
        {
            return(false);
        }
    }
}